package com.zhenwei.zscm.model.enums;

import lombok.Getter;

@Getter
public enum OrderStatusEnum {
    SUBMITTED("已提交"),
    PROCESSING("处理中"),
    STOP("已作废"),
    FINISHED("已完成");

    private final String text;
    OrderStatusEnum(String value) {
        this.text = value;
    }

    /**
     * 获取枚举的文本描述
     * @param str 枚举值
     * @return 文本描述
     */
    public static String textOf(String str) {
        try {
            return OrderStatusEnum.valueOf(str).getText();
        } catch (Exception e) {
            return "";
        }
    }
}
